package com.atchangsha.system.constant;

import com.atchangsha.system.common.exception.EnumInterface;

public class OrderConstants {
    public static final long MAKING = 1000 * 60;
    public static final String MAKING_STATUS = "制作中";
    public static final long IN_TRANSIT_BEFORE = 1000 * 60;
    public static final long IN_TRANSIT_AFTER = 1000 * 90;
    public static final String IN_TRANSIT = "传递中";
    public static final String ARRIVED = "已送达";
    public enum OrderEnum implements EnumInterface {
        PLACE_AN_ORDER_FAIL(-1703,"下单失败"),
        PLACE_AN_ORDER_SUCCESS(1704,"下单成功"),
        ORDER_NOT_PAY(-1705,"该订单还未支付"),
        DELETE_ORDER_SUCCESS(1706,"删除订单成功"),
        DELETE_ORDER_FAIL(-1707,"删除订单失败"),
        NOT_ORDER(-1708,"暂无订单"),
        PARTIAL_DELETION(-1709,"结账订单删除成功，部分订单未结账"),
        UPDATE_FAIL(-1710,"修改失败"),
        UPDATE_SUCCESS(1711,"修改成功"),
        ;

        private int code;
        private String message;

        OrderEnum(int code,String message){
            this.code = code;
            this.message = message;
        }

        @Override
        public int getCode() {
            return code;
        }

        @Override
        public String getMsg() {
            return message;
        }
    }
}

